<extend name="Public/layout" />

<block name="content">
    <section class="wrapper site-min-height">
        <!-- page start-->
        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                    <header class="panel-heading">
                        增加短信模版
                    </header>
                    <div class="panel-body">
                        <div class=" form">
                            <form class="ajax-from-submit" action="{:U('Admin/SmsTemplate/edit')}" method="post">
                                <input type="hidden" name="id" value="{$Think.get.id}">
                                <div class="form-group">
                                    <label for="title">模版标题</label>
                                    <input name="title" value="{$tmp.title}" type="text" class="form-control"  id="title" placeholder="请输入模版标题" required>
                                </div>
                                <div class="form-group">
                                    <label for="type">模版标识</label>
                                    <input name="type" value="{$tmp.type}" type="text" class="form-control" id="type" placeholder="请输入模版标识" required>
                                </div>

                                <div class="form-group">
                                    <label for="type">模版内容</label>
                                    <textarea name="content" class="form-control" placeholder="请输入模版内容">{$tmp.content}</textarea>
                                    <p class="help-block">
                                        <literal>注意：模版中需要替换的内容使用:"{XXX}"替换！
                                        如：{date} 会替换成当前时间"2016-09-24 16:08:53"
                                    </literal>
                                    </p>
                                </div>

                                <div class="form-group">
                                    <label for="add_status">状态</label>
                                    <select name="status" id="add_status" class="form-control">
                                        <option value="0" <eq name="tmp.status" value="0">selected="selected"</eq>>启用</option>
                                        <option value="1" <eq name="tmp.status" value="1">selected="selected"</eq>>禁用</option>
                                    </select>
                                </div>
                                <div class="form-group " >
                                    <button class="btn btn-info ajax-form-btn" type="submit">提交</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </section>
            </div>
        </div>
        <!-- page end-->
    </section>
</block>

<block name="javascript">
    <script>
        //菜单高亮
        MenuHighlight('{:U("Admin/SmsTemplate/index")}');
    </script>
</block>